﻿using Pro.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pro.DataAccess.Mappings
{
    public class ContactMapping : EntityTypeConfiguration<Contact>
    {
        public ContactMapping()
        {
            HasKey(it => it.Id).Property(it => it.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            Property(it => it.Username).HasMaxLength(50);
            Property(it => it.Subject).HasMaxLength(128);
            Property(it => it.QQ).HasMaxLength(15);
            Property(it => it.Body);
        }
    }
}
